package com.flexcloudsdk.xmpp;

import java.util.logging.Logger;
import com.google.appengine.api.xmpp.Message;
import com.google.appengine.api.xmpp.JID;                   
import com.google.appengine.api.xmpp.MessageType;

public class CloudMessage {
	private static final Logger log = Logger.getLogger(CloudMessage.class.getName());

	private Message message = null;
	
	public CloudMessage() {
		log.info("CloudMessage has been created by BlazeDS");
	}

	public void setMessage(Message value) {
		message = value;
	}
	
	public String getBody(){
		String value = null;
		if (message != null)
		 value = message.getBody();
		else
		  log.severe("getBody call failed in CloudMessage because message is null");
		return value;
	}
	
	public JID getFromJid() {
		return message.getFromJid();
	}
	
	public MessageType getMessageType() {
		return message.getMessageType();
	}
	
	public JID[] getRecipientJids() {
		return message.getRecipientJids();
	}

	public String getStanza() {
		return message.getStanza();
	}
	
	public boolean isXml() {
		return message.isXml();
	}
}
